package com.eol.common.base;

/**
 * Created with IntelliJ IDEA.
 * User: liulinhui
 * Date: 17-12-13
 * Time: 上午11:05
 * Description:  响应代码
 */
public enum BaseResponseCode {
    //通用
    OK(200, "请求成功"),
    NO(100, "请求失败"),

    RESOURCE_CAN_NOT_DELETE(209, "资源已经被使用，无法删除"),
    SHOT_MESSAGE_SEND_FAILED(301, "短信发送失败"),
    CODE_VERIFY_FAILED(302, "验证码错误"),
    ACCOUNT_VERIFY_FAILED(303, "账号输入错误"),
    PHONE_ALREADY_EXIT(304, "手机号码已经被注册了"),
    PHONE_FORMAT_FAILED(305, "手机号码不合法"),
    PHONE_ISNULL_FAILED(306, "手机号不能为空"),
    PASSWORD_ISNULL_FAILED(307, "密码错误"),
    PHONE_NONENTITY_FAILED(311, "用户未进行注册"),
    AUTH_EXCEPTION(1201, "请先登录"),
    TOKEN_FAIL_CREATE(501, "TOKEN生成失败"),
    TOKEN_INVALID(1502, "TOKEN无效,重新登录"),
    TOKEN_EXPIRED(1504, "TOKEN 过期了"),
    EXCEPTION(500, "程序出现异常"),

    WX_PAY_CREATE_FAIL(801, "微信支付下单失败"),
    PAY_CREATE_ORDER_ERROR(802, "创建订单失败"),

    WX_REFUND_CREATE_FAIL(801, "微信退款失败"),

    MILE_CODE_INVALID(505, "邮箱验证码无效");

    private final int code;
    private final String message;

    BaseResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
